<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="toggleCheck.js"></script>
</head>
<body>
<span class="one">111111</span>
<span class="two">222222</span>
<span class="three">333333</span>
<span class="four">444444</span>
<p></p>
<script>
    new ToggleCheck([".one",".two",".three",".four"],"active",2,function (ele,index) {
        console.info(ele,index)
    });
</script>
<style>
    .active{
        color: red;
    }
</style>
</body>
</html>